// Fill out your copyright notice in the Description page of Project Settings.


#include "BlockWallBase.h"

#include "SnakeBase.h"

// Sets default values
ABlockWallBase::ABlockWallBase()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComponent"));
}

// Called when the game starts or when spawned
void ABlockWallBase::BeginPlay()
{
	Super::BeginPlay();
	
}

// Called every frame
void ABlockWallBase::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

}

void ABlockWallBase::Interact(AActor* InterActor)
{
	ASnakeBase* SnakeBase = Cast<ASnakeBase>(InterActor);

	if (IsValid(SnakeBase))
	{
		SnakeBase->Destroy();
	}
}

